// 枚举类型

enum Direction {
  LEFT,
  RIGHT,
  TOP,
  BOTTOM
}

function turnDirection(direction: Direction) {
  switch (direction) {
    case Direction.LEFT:
      console.info('向左')
      break
    case Direction.RIGHT:
      console.info('向右')
      break
    case Direction.TOP:
      console.info('向上')
      break
    case Direction.BOTTOM:
      console.info('向下')
      break
  }
}

turnDirection(Direction.LEFT)
export { }